package com.lazycat.backend.controller.user;

import com.lazycat.backend.service.impl.user.RemoveCommentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RemoveCommentController {
    @Autowired
    private RemoveCommentServiceImpl removeCommentService;

    @PostMapping("user/removeComment/")
    public void remove(@RequestBody Map<String,String> map) {
        Integer id = Integer.parseInt(map.get("id"));
        removeCommentService.remove(id);
    }
}
